package com.bdqn.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bdqn.pojo.Right;
import com.bdqn.pojo.Role;
import com.bdqn.pojo.User;
import org.springframework.data.domain.Pageable;
import java.util.List;
public interface RoleMapper extends BaseMapper<User> {
   List<Role> list();
   //角色增删改查
   public List<Role> findAllRoles();
   public Role saveRole(Role role);//新增或者修改
   public void deleteRoleById(Long roleId);
   public Role getRole(Long roleId);
   //根据角色名称进行模糊查询并分页
   public Page<Role> findRolesByRoleNameLike(String roleName, Pageable pageable);
   public List<Right> findAllRights();
   public List<Right> findRightsByRole(Role role);
   public Role findRoleByUsers(User user);
}
